package com.dc.wifi.main.ui.activity

import android.os.Bundle
import com.dc.netlib.base.BaseActivity
import com.dc.wifi.BR
import com.dc.wifi.databinding.ActivityDevicesBinding
import com.dc.wifi.main.adapter.pageadapter.MyPagerAdapter
import com.dc.wifi.main.model.DevicesViewModel
import com.dc.wifi.main.ui.fragment.DeviceFragment
import com.dc.wifi.main.ui.fragment.IntentFragment
import com.qmuiteam.qmui.widget.tab.QMUIBasicTabSegment


//通用 network
class DevicesActivity :
    BaseActivity<DevicesViewModel, ActivityDevicesBinding>(
        com.dc.wifi.R.layout.activity_devices,
        BR.mDevicesViewModel
    ) {
    override fun initData() {
        super.initData()
        val listOf = listOf(DeviceFragment.createFragment(), IntentFragment.createFragment())
        binding.vp.adapter = MyPagerAdapter(supportFragmentManager, listOf)

        binding.tl3.setViewPager(binding.vp)
    }

    override fun initView(savedInstanceState: Bundle?) {
        super.initView(savedInstanceState)
        binding.commonTitle.arrayLeft.setOnClickListener { finish() }
    }
}